-- GENERATED SPELL FOR [Warp Stalker] --


function spell0_18464(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17261,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18464', 539, 1)
end

function spell1_18464(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14921,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18464', 0, 1)
end

function spell2_18464(pUnit, Event) --@Phase Burst,Self--
pUnit:FullCastSpellOnTarget(32939,pUnit)
pUnit:RegisterEvent('Sorts_18464', 673, 1)
end

function spell3_18464(pUnit, Event) --@Phasing Invisibility,Self--
pUnit:FullCastSpellOnTarget(32942,pUnit)
pUnit:RegisterEvent('Sorts_18464', 0, 1)
end

function spell4_18464(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(32922,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18464', 10000, 1)
end

function spell5_18464(pUnit, Event) --@Warp,n/a--
pUnit:FullCastSpellOnTarget(35346,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18464', 4000, 1)
end

function Sorts_18464(pUnit, Event)
local choix_sorts_18464 = math.random(0, 5)
if choix_sorts_18464 == 0 then
pUnit:RegisterEvent('spell0_18464', 1, 1)
end
if choix_sorts_18464 == 1 then
pUnit:RegisterEvent('spell1_18464', 1, 1)
end
if choix_sorts_18464 == 2 then
pUnit:RegisterEvent('spell2_18464', 1, 1)
end
if choix_sorts_18464 == 3 then
pUnit:RegisterEvent('spell3_18464', 1, 1)
end
if choix_sorts_18464 == 4 then
pUnit:RegisterEvent('spell4_18464', 1, 1)
end
if choix_sorts_18464 == 5 then
pUnit:RegisterEvent('spell5_18464', 1, 1)
end
end

function mob18464_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18464', math.random(1500, 3000), 1)
end

function mob18464_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18464_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18464_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18464, 1, 'mob18464_Action')
RegisterUnitEvent(18464, 2, 'mob18464_Leave')
RegisterUnitEvent(18464, 3, 'mob18464_Kill')
RegisterUnitEvent(18464, 4, 'mob18464_Die')
